package com.sq.partner.manager.dao.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Repository;

import com.sq.partner.manager.dao.TradCheckcontactsDao;
import com.sq.partner.manager.dao.TradConfigDao;
import com.sq.partner.manager.mybatis.model.TradCheckcontacts;
import com.sq.partner.manager.mybatis.model.TradConfig;
import com.sq.partner.manager.util.LogUtil;
@Repository
public class TradConfigDaoImpl extends BaseDaoImpl implements TradConfigDao {
	private static Logger logger = LogUtil.getLog(TradConfigDaoImpl.class);

	@Override
	public boolean insertTradConfigNotNull(TradConfig config ) throws Exception {
		
		return this.add("insertTradConfig", config);
	}

	@Override
	public TradConfig selectUnionMessageConfig(Map<String, String> map) throws Exception {
		
		return (TradConfig)this.query("selectTradConfig", map);
	}

	@Override
	public boolean updateUnionMessageConfig(TradConfig config) throws Exception {
		return this.update("updateUnionMessageConfig", config);
	}

	@Override
	public List<String> selectCoreProdCodeByDptCde(Map<String,String> dptCdeAndType) throws SQLException {
		return this.queryList("selectCoreProdCodeByDptCde",dptCdeAndType);
	}

}
